package com.dreammakerteam.frameworkdemo.base.domain;

import java.io.Serializable;

/**
 * rest返回
 * @author xy
 * @version 0.1
 */
public class RestResult implements Serializable {
    private static final long serialVersionUID = -3066945306473795867L;

    public static RestResult successResult = new RestResult().setSuccess(true).setMsg("成功");
    public static RestResult failedResult = new RestResult().setSuccess(false).setMsg("失败");



    private String msg;
    private boolean success = true;
    private Object result;

    public String getMsg() {
        return msg;
    }

    public RestResult setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public boolean isSuccess() {
        return success;
    }

    public RestResult setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public Object getResult() {
        return result;
    }

    public RestResult setResult(Object result) {
        this.result = result;
        return this;
    }
}
